﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Xml.Serialization;

namespace Sovigaz.DataProvider
{
    public partial class SovigazDbContext
    {
        public DbSet<Role> Roles { get; set; }
    }

    [Table("Roles")]
    public class Role : AuditableEntity
    {
        public Role()
        {
            IsActived = true;
            RolePermissions = new List<RolePermission>();
        }

        [Key]
        public int RoleID { get; set; }

        public string RoleName { get; set; }

        public string Description { get; set; }

        [XmlIgnore]
        public ICollection<RolePermission> RolePermissions { get; set; }

        [XmlIgnore]
        public ICollection<UserRole> UserRoles { get; set; }

        [XmlIgnore]
        public ICollection<UserRoleComplex> UserRoleComplexs { get; set; }
    }
}